package com.yu1996.base;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import util.IdWorker;

@SpringBootApplication
public class BaseApplication {

    public static void main(String[] args) {
        SpringApplication.run(BaseApplication.class, args);
    }


    /**
     * @param
     * @return util.IdWorker   返回id生成类  注入spring容器
     * @description 将需要用到的commom类中的组件  加入spring容器中
     * @date 2019/9/1 20:21
     */
    @Bean
    public IdWorker idWorker() {
        return new IdWorker(1, 1);
    }
}
